<!DOCTYPE html>
<!--suppress ThymeleafVariablesResolveInspection -->
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" th:href="@{/yb_system_css/commone.css}">
    <link rel="stylesheet" th:href="@{/yb_system_css/commthree.css}">
    <script type="text/javascript" src="./yb_system_js/common.js"></script>
</head>
<body>
<!--登录栏目-->
<div th:fragment="header" class="content-top">
    <div class="content-top-info">
        <div class="content-top-left">
            <div class="left-logo">
                <a th:href="@{/homePage}" class="logo-info" target="_self"><img th:src="@{/yb_system_picture/logo.png}" alt="有贝口腔网"></a>
            </div>
            <ul class="right-list">
                <li>
                    <a th:href="@{/consult}" target="_self">
                        <img th:src="@{/yb_system_picture/news-icon.png}" alt="有贝口腔网">
                        <span>资讯</span>
                    </a>
                </li>
                <li>
                    <a th:href="@{/askAnswer}" target="_self">
                        <img th:src="@{/yb_system_picture/qa-icon.png}" alt="有贝口腔网">
                        <span>问答</span>
                    </a>
                </li>
            </ul>
        </div>
        <form th:action="@{/search}" method="get">
            <div class="content-top-right">
                <div class="search-input">
                    <img class="search-icon" th:src="@{/yb_system_picture/icon_Search.png}">
                    <input class="top-search" type="text" name="kw" placeholder="请输入资讯、问题搜索" value="">
                    <input class="search-sub" type="submit" value="搜索">
                </div>
                <div class="land-regist" th:if="${userObject != null && userObject.userMember == null}">
                    <a class="top-land" href="/login">登录</a>
                    <span></span>
                    <a class="top-regist" href="/register">注册</a>
                </div>
                <div class="land-success" th:if="${userObject != null && userObject.userMember != null}">
                        <script type="text/javascript">
                            if(isLogin()){
                                getUserReadCount();
                            }
                            function getUserReadCount(){
                                $.post("/user/center/getNoReadCount",function(data){
                                    var msgCount=0;
                                    var html="<a href=\"/messages\">#type<span class=\"tips-num\">#count</span></a>";
                                    var setHtml="";
                                    $("#myNoticeModul").html(setHtml);
                                    var list=data;
                                    console.log(list);
                                    var size=list.length;
                                    for(var i=0;i<size;i++){
                                        var type=list[i].type;
                                        var count=list[i].count;
                                        msgCount=msgCount+count;
                                        if(type==10){
                                            setHtml=html.replace("#type","文章审核").replace("#count",count);
                                        }else if(type==20){
                                            setHtml=html.replace("#type","提问审核").replace("#count",count);
                                        }else if(type==30){
                                            setHtml=html.replace("#type","回答审核").replace("#count",count);
                                        }
                                        $("#myNoticeModul").append(setHtml);
                                    }
                                    if(msgCount==0){
                                        setHtml=html.replace("#type","站内消息").replace("#count",msgCount);
                                        $("#myNoticeModul").append(setHtml);
                                    }
                                    $("#msgCount").html(msgCount);
                                    if(msgCount>0){
                                        $(".notice-tip").show();
                                    }else{
                                        $(".notice-tip").hide();
                                    }
                                });
                            }
                        </script>
                    <div class="message-notice">
                        <a th:href="@{/messages}">
                            <img th:src="@{/yb_system_picture/notice.png}" alt="有贝口腔网">
                            <span class="notice-tip" id="msgCount" style="display:none"></span>
                        </a>
                        <div class="notice-modul" id="myNoticeModul">

                        </div>
                    </div>
                    <div class="land-success-img">
                        <a th:href="@{/personalHomepage}">
                            <img th:if="${userObject != null && userObject.userMember != null && userObject.userMember.photoPath == null}" th:src="@{/yb_system_picture/user_Default.png}" alt="有贝口腔网">
                            <img th:if="${userObject != null && userObject.userMember != null && userObject.userMember.photoPath != null}" th:src="@{${userObject.userMember.photoPath}}" alt="有贝口腔网">
                            <span class="land-success-name" th:text="${userObject.userMember.nickname}" th:if="${userObject != null && userObject.userMember != null}"></span>
                        </a>
                        <div class="img-posi-div">
                            <a th:href="@{/personalDetail}"><span>个人信息</span></a>
                            <a href="javascript:;" onclick="loginOut()"><span>退出登录</span></a>
                        </div>
                    </div>
                </div>
            </div>
        </form>
    </div>
</div>
<!--尾部-->
<div th:fragment="footer" class="content-foot">
    <div class="content-foot-info">
        <div class="foot-left">
            <a th:href="@{/homePage}">
                <img src="./yb_system_picture/foot-logo.png" alt="有贝口腔网">
                <div>www.hasbei.com</div>
            </a>
        </div>
        <div class="foot-line"></div>
        <div class="foot-right">
            <ul class="foot-info">
                <li><a th:href="@{/about(aboutId=1)}" target="_blank">关于我们</a></li>
                <li><a th:href="@{/about(aboutId=2)}" target="_blank">联系我们</a></li>
                <li><a th:href="@{/about(aboutId=3)}" target="_blank">网站地图</a></li>
                <li><a th:href="@{/messageFeedback}" target="_blank">留言反馈</a></li>
                <li><a th:href="@{/about(aboutId=5)}" target="_blank">招聘信息</a></li>
                <li><a th:href="@{/about(aboutId=6)}" target="_blank">用户协议</a></li>
                <li></li>
            </ul>
            <ul class="youqing-link">
                <div>友情链接：</div>
                <li><a th:href="@{/homePage}">口腔网</a><span class="line-verctil">|</span></li>
                <li><a href="http://www.ebrace.com.cn/" rel="nofollow">瑞通生物</a><span class="line-verctil">|</span>
                </li>
                <li><a href="http://www.dmcapital.cn/" rel="nofollow">德摩资本口腔基金</a></li>
            </ul>
            <p class="beian-info">
                <a href="javascript:void(location.href=&#39;http://www.beian.miit.gov.cn/&#39;)" rel="nofollow">粤ICP备20050465号</a>
                /
                <a th:href="@{/homePage}">增值电信业务经营许可证</a>
                <a th:href="@{/homePage}">互联网医疗保健信息服务同意书</a>
            </p>
            <p class="beian-info"> @ 2020 深圳有贝信息科技有限公司 All Rights Reserved</p>
        </div>
    </div>
    <!-- 移动端 -->
    <div class="content-foot-info-phone">
        <ul class="foot-list">
            <li><a th:href="@{/about(aboutId=1)}" target="_blank">关于我们</a></li>
            <li><a th:href="@{/about(aboutId=2)}" target="_blank">联系我们</a></li>
            <li><a th:href="@{/about(aboutId=3)}" target="_blank">网站地图</a></li>
            <li><a th:href="@{/messageFeedback}" target="_blank">留言反馈</a></li>
            <li><a th:href="@{/about(aboutId=5)}" target="_blank">招聘信息</a></li>
            <li></li>
            <li></li>
        </ul>
        <div class="foot-info">
            <div class="foot-left">
                <a th:href="@{/homePage}">
                    <img src="./yb_system_picture/foot-logo.png" alt="有贝口腔网">
                    <div>www.hasbei.com</div>
                </a>
            </div>
            <p><a href="javascript:void(location.href=&#39;http://www.beian.miit.gov.cn/&#39;)" rel="nofollow">粤ICP备20050465号</a>
            </p>
        </div>
    </div>
</div>

</body>
</html>